<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			[v-clock]{
				display: none;
			}
		</style>
	</head>
	<body>
		<div id="example">
			<p ref="content">atguigu.com</p>
			<button @click="hint">提示</button>
			<p v-clock>{{msg}}</p>
		</div>
		
		<script type="text/javascript" src="js/vue.js"></script>
		<script>
			new Vue({
				el: "#example",
				data: {
					msg: "尚硅谷"
				},
				methods: {
					hint(){
						alert(this.$refs.content.textContent)
					}
				}
			})
		</script>
	</body>
</html>
